import React from 'react'
import ReactDOMServer from 'react-dom/server'
import Blog from './Blog.js'
import { ServerStyleSheets } from '@material-ui/core/styles';
const sheets = new ServerStyleSheets();
require('fs').writeFileSync("./a/index.html", 
renderFullPage(ReactDOMServer.renderToStaticMarkup(sheets.collect(
  <Blog />,
)), sheets.toString()),
'utf8')

function renderFullPage(html, css) {
  return `
    <!DOCTYPE html>
    <html>
      <head>
        <title>My page</title>
        <style id="jss-server-side">${css}</style>
      </head>
      <body>
        <div id="root">${html}</div>
      </body>
    </html>
  `;
}

function Header () {}
function Index () {}
function Post () {}
function Sidebar () {}
function Contents () {}

const config = {
  
}
